//
//  IAAAuthCheDetailTCell.m
//  iPadAuditAuthorise
//
//  Created by XiangDongMBP on 16/9/7.
//  Copyright © 2016年 XiangDong. All rights reserved.
//

#import "IAAAuthCheDetailTCell.h"
#import "IAAAuthCheckModel.h"
#import "IAAHisTaskModel.h"

@implementation IAAAuthCheDetailTCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)configViewWithData:(IAAAuthCheckDetailModel *)model index:(NSInteger)index {
    NSArray *titleArray = @[@"设备编号：",
                            @"业务类型：",
                            @"审核意见：",
                            @"审核状态："];
    NSArray *contArray = @[(model.deviceNo ? model.deviceNo : @""),
                           (model.busiName ? model.busiName : @""),
                           (model.fstReason ? model.fstReason : @""),
                           (model.fstState ? model.fstState : @"")];
    if (index < titleArray.count) {
        self.titleLabel.text = titleArray[index];
        self.contentLabel.text = contArray[index];
    }
}

@end

@implementation IAAAuthCheDetailTCell (IAAHisTaskDetail)

- (void)configViewWithHisTaskDetail:(IAAHisTaskItem *)model index:(NSInteger)index {
    NSArray *titleArray = @[@"流水号：",
                            @"终端号：",
                            @"交易名称：",
                            @"客户名称：",
                            @"帐号：",
                            @"申请时间：",
                            @"一审状态：",
                            @"一审时间：",
                            @"一审人员：",
                            @"二审状态：",
                            @"二审时间：",
                            @"二审人员：",
                            @"不通过理由："];
    NSArray *contArray = @[(model.busiId ? model.busiId : @""),
                           (model.deviceNo ? model.deviceNo : @""),
                           (model.busiName ? model.busiName : @""),
                           (model.customerName ? model.customerName : @""),
                           (model.accNo ? model.accNo : @""),
                           (model.reqTime ? model.reqTime : @""),
                           (model.fstState ? model.fstState : @""),
                           (model.fstTime ? model.fstTime : @""),
                           (model.fstUserNo ? model.fstUserNo : @""),
                           (model.secState ? model.secState : @""),
                           (model.secTime ? model.secTime : @""),
                           (model.secUserNo ? model.secUserNo : @""),
                           (model.failReason ? model.failReason : @"")];
    if (index < titleArray.count) {
        self.titleLabel.text = titleArray[index];
        self.contentLabel.text = contArray[index];
    }
}

@end
